package org.dromara.iot.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.iot.domain.IotUpkeepPlan;

import java.util.Date;

/**
 * 电梯保养计划业务对象 iot_upkeep_plan
 *
 * @author lsl
 * @date 2024-06-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = IotUpkeepPlan.class, reverseConvertGenerate = false)
public class IotUpkeepPlanBo extends BaseEntity {

    /**
     * 计划ID
     */
    @NotNull(message = "计划ID不能为空", groups = {EditGroup.class})
    private Long planId;

    /**
     * 关联电梯ID
     */
    @NotNull(message = "关联电梯ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long elevatorId;

    /**
     * 关联模板ID
     */
    @NotNull(message = "关联模板ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long templateId;

    /**
     * 保养类型
     */
    @NotBlank(message = "保养类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private String upkeepType;

    /**
     * 保养间隔
     */
    @NotNull(message = "保养间隔不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long upkeepInterval;

    /**
     * 首次保养时间
     */
    private Date firstUpkeepTime;

    /**
     * 最近一次保养时间
     */
    private Date recentlyTime;

    /**
     * 保养提醒天数
     */
    @NotNull(message = "保养提醒天数不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long remindDay;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = {AddGroup.class, EditGroup.class})
    private String remark;

    private String elevatorName;
}
